#include "subwidget.h"

subwidget::subwidget(QWidget *parent) : QWidget(parent)
{
    setWindowTitle("老二");
    b1.setParent(this);
    b1.setText("切换到老大");
    connect(&b1,&QPushButton::pressed, this, &subwidget::myslot);
    resize(300,300);
}

void subwidget::myslot()
{
    emit mySignal();
}
